package com.huawei.appmarket.service.settings.card;

import android.content.Context;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.TextView;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant.KeyAndValue;
import huawei.widget.HwSwitch;
import o.cgz;
import o.der;
import o.der.f;
import o.dge.d;
import o.dgh;
import o.dss;

public class SettingUpdateDisturbCard extends BaseSettingCard {
    private HwSwitch ॱ;

    class a implements OnCheckedChangeListener {
        final /* synthetic */ SettingUpdateDisturbCard ˎ;

        private a(SettingUpdateDisturbCard settingUpdateDisturbCard) {
            this.ˎ = settingUpdateDisturbCard;
        }

        public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
            dss.ॱ().ˏ(!z);
            dgh.onEvent(new d(this.ˎ.ᐝ, f.ʻᐝ).ˏ(!z ? "02" : KeyAndValue.NUMBER_01).ˋ());
        }
    }

    public SettingUpdateDisturbCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        TextView textView = (TextView) view.findViewById(der.d.ʽʻ);
        ((TextView) view.findViewById(der.d.ʽʼ)).setText(f.ˎꓸ);
        textView.setText(f.ˎˍ);
        this.ॱ = (HwSwitch) view.findViewById(der.d.ˇ);
        if (this.ॱ != null) {
            this.ॱ.setChecked(!dss.ॱ().ˊ());
            this.ॱ.setOnCheckedChangeListener(new a());
        }
        ʽ(view);
        return this;
    }
}
